/...
+import md5 from 'js-md5'
const buildCacheImpl = impl => {
...
/**
 * 本地缓存
 */
-  local: buildCacheImpl(window.localStorage)
+  local: buildCacheImpl(window.localStorage),
+  /**
+   * 2FA缓存
+   */
+  twoFA: {
+    ...buildCacheImpl(window.sessionStorage),
+    /**
+     * 设置认证密码
+     *
+     * @param value 密码
+     * @param rememberPwd 是否记住密码
+     */
+    setPassword (value, rememberPwd = false) {
+      value = md5(value)
+      // 记住密码时，默认记住5分钟
+      const timeout = 5 * 60 * 1000
+      this.set('eva-2fa-password', value, rememberPwd ? timeout : -1)
+    },
+    /**
+     * 获取认证密码
+     * @returns {*}
+     */
+    getPassword () {
+      return this.get('eva-2fa-password')
+    },
+    /**
+     * 删除认证密码
+     */
+    removePassword () {
+      this.remove('eva-2fa-password')
+    }
+  }
.../